<build>(docker): refactor our dockerfile according to best practice#51
Open
david30907d wants to merge 4 commits intoDT42:masterfrom
Open
<build>(docker): refactor our dockerfile according to best practice#51david30907d wants to merge 4 commits intoDT42:masterfrom
david30907d wants to merge 4 commits intoDT42:masterfrom
Conversation
f91ab7c to
a0caca0
Compare
1daf666 to
0d9386f
Compare
9b6c1ed to
bd22c28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do some dockerfile refactor according to official dockerfile_best-practices
The reason why these refactor are essential is that it's risky without locking the version of packages.
Here's what i've done in this PR:
--no-install-recommendsandrm -rf /var/lib/apt/lists/*is highly recommended in production env to slim the image sizeuse a package manager as
poetryto lock packages versionremove compiler, git and other redundant tools after
BerryNet ./configureis doneMove the rest of python dependencies into
poetry.lockBecause we use
func 2>&1 | tee -a $LOGinconfigure, docker build would still finish successfully if there's an error happened in./configure.